<!-- php:$title = "收货地址_会员中心" --><!-- include tpl=header title=$title -->
<section class="container"><div class="mt-3"><!-- include tpl=block/breadcrumb --></div></section>
<section class="container">
	<div class="row">
		<div class="col-sm-3">
			<!-- include tpl=block/usercp_nav -->
		</div>
		<div class="col-sm-9">
			<div class="card">
				<div class="card-header">收货地址</div>
				<table class="table">
					<thead>
						<tr>
							<th></th>
							<th>收件人/地址</th>
							<th>联系方式</th>
							<th style="width:260px">操作</th>
						</tr>
					</thead>
					<tbody>
						<!-- loop from=$rslist key=$key value=$value -->
						<tr>
							<td>#{$value.id}</td>
							<td>{$value.fullname}<br />{$value.province}<!-- if $value.province != $value.city -->{$value.city}<!-- /if -->{$value.county}-{$value.address}</td>
							<td>{$value.mobile}<!-- if $value.mobile && $value.tel --> / <!-- /if -->{$value.tel}</td>
							<td>
								<div class="btn-group">
									<button type="button" onclick="$.address.edit('{$value.id}')" class="btn btn-primary">编辑</button>
									<button type="button" onclick="$.address.del('{$value.id}')" class="btn btn-danger">删除</button>
									<!-- if !$value.is_default -->
									<button type="button" onclick="$.address.set_default('{$value.id}')" class="btn btn-primary">设为默认</button>
									<!-- else -->
									<button type="button" class="btn btn-primary" disabled>默认地址</button>
									<!-- /if -->
								</div>
							</td>
						</tr>
						<!-- /loop -->
					</tbody>
				</table>
			</div>
			
			
			<!-- if $total < 30 -->
			<div class="p-4 text-center">
				<button type="button" onclick="$.address.add()" class="btn btn-primary">添加地址</button>
			</div>
			<!-- /if -->
		</div>
	</div>
</section>

<!-- include tpl=footer -->